package com.sc.nft.admin.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.sc.nft.dto.TaskPrizeDTO;
import com.sc.nft.enums.task.ParticipantsEnum;
import com.sc.nft.enums.task.TaskTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
public class EditTaskRequest extends IdRequest {
    @ApiModelProperty("任务模板Id")
    @NotNull(message = "任务模板Id不能为空")
    private Long taskPanelId;


    @ApiModelProperty("任务图标")
    @NotBlank(message = "任务图标不能为空")
    private String taskIcon;

    @ApiModelProperty("任务名称")
    @NotBlank(message = "任务名称不能为空")
    private String taskName;

    @ApiModelProperty("完成任务邀请人数")
    private Integer inviteCount;

    @ApiModelProperty("购买藏品Id")
    private Long buyCollectionId;
    @ApiModelProperty("累计金额")
    private BigDecimal totalPrice;
    @ApiModelProperty("任务开始时间")
    @NotNull(message = "任务开始时间不能为空")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date taskStartDate;

    @ApiModelProperty("任务结束时间")
    @NotNull(message = "任务结束时间不能为空")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date taskEndDate;

    @ApiModelProperty("完成上限")
    private Integer superiorLimit;

    @ApiModelProperty("参与对象UNLIMITED:不限  APPOINT:指定NFT")
    @NotNull(message = "参与对象不能为空")
    private ParticipantsEnum participants;

    @ApiModelProperty("参与指定商品id")
    private Long partakeCollectionId;

    @ApiModelProperty("任务奖励")
    @NotNull(message = "任务奖励不能为空")
    private List<TaskPrizeDTO> taskPrizeDTOS;
    @ApiModelProperty("权重")
    private Integer sort;


    @ApiModelProperty("任务进度重置 0 当天0点 1每周一0点")
    @Range(min = 0,max = 1,message = "任务进度不正确")
    private Integer taskPlan;
    @ApiModelProperty(value = "藏品范围")
    private Boolean collectionRange;

    @ApiModelProperty(value = "商品范围")
    private Boolean mallRange;
    @ApiModelProperty("指定商品")
    private List<Long> linkIds;
}
